home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / HyperCard Related / APDA HyperCard Toolkits / HyperCard Video Toolkit 2.0 / HVT #2 / Advanced Material / Video Sources / searchVideo.p < prev    next >
Encoding:
Text File  |  1995-02-07  |  1.5 KB  |  72 lines  |  [TEXT/MPS ]

  1. (*
  2.     searchVideo frame - Go to the frame indicated, blanking the display if indicated by global
  3.         variable blankNextVideo being set to true.
  4.  
  5.     To compile and link this file using Macintosh Programmer's Workshop,
  6.  
  7.         pascal -w searchVideo.p
  8.  
  9.         link -m ENTRYPOINT -o HyperCommands -rt XCMD=8004 -sn Main=searchVideo ∂
  10.             searchVideo.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o
  11.  
  12.     Copyright © 1987,88 Apple Computer, Inc.
  13.  
  14.     9/87 - Initial coding by Harry R. Chesley.
  15.     2/88 - Changed for new interface specification by Harry R. Chesley.
  16. *)
  17.  
  18. {$R-}
  19.  
  20. {$S searchVideo }     { Segment name must be the same as the command name. }
  21.  
  22. unit DummyUnit;
  23.  
  24. interface
  25.  
  26. uses MemTypes, QuickDraw, OSIntf, HyperXCmd;
  27.  
  28. procedure EntryPoint(paramPtr: XCmdPtr);
  29.     
  30. implementation
  31.  
  32. type
  33.  
  34. Str31 = String[31];
  35.  
  36. procedure searchVideo(paramPtr: XCmdPtr); forward;
  37.  
  38. procedure EntryPoint(paramPtr: XCmdPtr);
  39.  
  40.     begin
  41.         searchVideo(paramPtr);
  42.     end;
  43.  
  44. procedure searchVideo(paramPtr: XCmdPtr);
  45.  
  46.     var numberOfParms: integer;
  47.         frameNumber: str255;
  48.  
  49.     {$I XCmdGlue.inc}
  50.  
  51.     procedure Fail(errMsg: Str255); { set theResult and quit }
  52.         begin
  53.             paramPtr^.returnValue := PasToZero(errMsg);
  54.             exit(searchVideo);
  55.         end;
  56.  
  57.     {$I VideoUtil.inc}
  58.  
  59.     begin
  60.         numberOfParms := paramPtr^.paramCount;
  61.         if (numberOfParms <> 1) then Fail('parameter count is not 1');
  62.  
  63.         { Get the frame to search to. }
  64.         GetStrParm(1,frameNumber);
  65.         if StrToNum(frameNumber) < 0 then frameNumber := '0';
  66.  
  67.         { Do it...}
  68.         videoCmd('search',frameNumber);
  69.     end;
  70.  
  71. end.
  72.